import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
# 读取CSV文件
data = pd.read_csv(r'E:\code\imagedata\labelfromQH\data\csv_data\202311010001_LCW_aD_5.csv')

# 获取行数和列数
num_rows = data.shape[0]
num_columns = data.shape[1]

# 创建值为0的矩阵
matrix = np.zeros((num_rows, num_columns))

# 计算中心位置
center_row = num_rows // 2
center_column = num_columns // 2

# 在中心位置创建圆形
for i in range(num_rows):
    for j in range(num_columns):
        # 计算当前位置与中心位置的距离
        distance = np.sqrt((i - center_row)**2 + (j - center_column)**2)

        # 如果距离小于等于10，则将值设置为35
        if distance <= 15:
            matrix[i, j] = 35
np.savetxt('matrix.csv', matrix, delimiter=',')
plt.imshow(matrix, cmap='jet', vmin=0, vmax=100)
plt.show()